|
haptic5 2.2.0
|
Haptic 5 Click example. More...
Functions | |
| void | application_init (void) |
| void | application_task (void) |
| int | main (void) |
Haptic 5 Click example.
This example demonstrates the control of the Haptic 5 Click board. In I2C mode, the example toggles the haptic trigger pin periodically to generate vibration pulses. In PWM mode, it gradually increases and decreases the output duty cycle to modulate the vibration intensity, while toggling the direction when the duty reaches 0%.
The demo application is composed of two sections :
Initializes the logger and the Click board driver, and applies the default configuration.
Depending on the selected communication interface (I2C or PWM), toggles the haptic trigger (I2C), or changes PWM duty cycle and direction (PWM).
| void application_init | ( | void | ) |
< Logger config object.
< Click config object.
Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG
| void application_task | ( | void | ) |
| int main | ( | void | ) |